// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import './config/rem'
import 'view-design/dist/styles/iview.css';
import MintUI from 'mint-ui'
import Vant from 'vant'
import 'vant/lib/index.css'
import { Tab, Tabs } from 'vant'
import 'mint-ui/lib/style.css'
Vue.use(MintUI);
import VueCookies from 'vue-cookies'
Vue.use(VueCookies);
import echarts from 'echarts';
import moment from 'moment/moment'
Vue.filter('moment', function (value, formatString) {
  formatString = formatString || 'YYYY-MM-DD HH:mm:ss';
  // return moment(value).format(formatString);
  return moment.unix(value).format(formatString); // 这是时间戳转时间
});
Vue.prototype.$echarts = echarts

Vue.use(Tab)
Vue.use(Tabs)
Vue.config.productionTip = false
//自定义标题
router.beforeEach((to,from,next)=>{
    if(to.meta.title){
      document.title=to.meta.title;
    }
    next();
});
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
});
